package com.ganlebao.study.springcloudfeignclient.basic;

import com.ganlebao.study.springcloudfeignclient.basic.dto.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试返回图片,多参数提交以及文件上传等内容的服务
 */
@RestController
@RequestMapping("server/test")
public class ServerController {

    /**
     * 测试多参数
     *
     * @param user
     * @return
     */
    @RequestMapping("echo-user")
    public String echoUser(User user) {
        if (user == null) {
            return "空用户";
        }
        return user.toString();
    }
}
